Conversation
- Add src/models/nvidia.js - Implement integration for NVIDIA NIM API (minimaxai/minimax-m2.1)
Added NVIDIA_API_KEY to keys.example.json as a placeholder.
### Usage Example for andy.json:
{
"name": "andy",
"model": "nvidia/deepseek-ai/deepseek-v3.2"
}
Usage Example for andy.json:{ |
There was a problem hiding this comment.
Pull request overview
This pull request adds support for the NVIDIA NIM provider as an OpenAI-compatible API integration. The implementation follows the established pattern used by other model providers in the codebase, enabling users to interact with NVIDIA's AI models through the same interface as other supported providers.
Changes:
- Added new NVIDIA provider class with OpenAI-compatible API integration
- Updated example configuration file with NVIDIA API key placeholder
- Implemented context length overflow handling with automatic retry logic
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 6 comments.
| File | Description |
|---|---|
| src/models/nvidia.js | New provider class implementing NVIDIA NIM API with sendRequest and embed methods, following the OpenAI-compatible pattern |
| keys.example.json | Added NVIDIA_API_KEY placeholder and fixed formatting for MERCURY_API_KEY |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
keys.example.json
Outdated
| "MERCURY_API_KEY":"", | ||
| "NVIDIA_API_KEY":"" |
There was a problem hiding this comment.
Missing space after colon in "MERCURY_API_KEY":"". For consistency with other entries in this file (lines 2-17), there should be a space after the colon, i.e., "MERCURY_API_KEY": "".
| "MERCURY_API_KEY":"", | |
| "NVIDIA_API_KEY":"" | |
| "MERCURY_API_KEY": "", | |
| "NVIDIA_API_KEY": "" |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
|
@Sweaterdog why would you review just 58 lines with Copilot |
|
it's a bit useless PR, you can just do "model": {
"api": "openai",
"model": "deepseek-ai/deepseek-v3.2",
"url": "https://integrate.api.nvidia.com/v1/"
},since it's OpenAI-compatible. and then you can put your nvidia api key into the |
Summary of changes:
src/models/nvidia.jsto support NVIDIA NIM API (OpenAI compatible).keys.example.jsonwithNVIDIA_API_KEYplaceholder.